const apiMapFunc = (commentPath, api) => {
  const apiProxy = new Proxy(api, {
    get(target, key) {
      const result = target[key];
      return commentPath + result;
    }
  });
  return apiProxy;
};
const api = {
  api_login: '/login',
  api_loginCheck: '/loginCheck',
  api_validateToken: '/validateToken',
  api_refreshToken: '/refreshToken',
  api_queryUserList: '/AM-001',
  api_editUser: '/AM-002',
  api_deleteUser: '/AM-003',
  api_editPassword: '/AM-004',
  api_resetPassword: '/AM-005',
  api_editUserRole: '/AM-006',
  api_queryDepartmentList: '/AM-007',
  api_editDepartment: '/AM-008',
  api_deleteDepartment: '/AM-009',
  api_queryRoleList: '/AM-010',
  api_editRole: '/AM-011',
  api_deleteRole: '/AM-012',
  api_editRolePermission: '/AM-013',
  api_queryPermissions: '/AM-014',
  api_editPermission: '/AM-015',
  api_deletePermission: '/AM-016',
  api_queryFilterList: '/AM-017',
  api_editFilter: '/AM-018',
  api_deleteFilter: '/AM-019',
  api_filterSort: '/AM-020',
  api_queryRecordList: '/AM-021',
  api_queryUserPermissions: '/AM-022',
  api_queryPermissionsInfo: '/AM-023',
  api_currentUser: '/AM-024',
  api_queryDepartmentAll: '/AM-025',
  api_getRoleList: '/AM-026',
  api_getUserRole: '/AM-027',
  api_getRolePermission: '/AM-028',
  api_diffPassword: '/AM-029',
  api_queryPermissionsTypeList: '/AM-030',
  api_queryUserNavs: '/AM-031',
  api_getApis: '/AM-032',
  api_getPermissionApis: '/AM-033',
  api_savePermissionApis: '/AM-034',
  // authority
  api_queryAuthApis: '/AM-035',
  api_checkMFA: '/AM-036',
  api_getMFAQrCode: '/AM-037',
  api_resetMfaSecret: '/AM-038',
  api_saveApInfo: '/AM-039',
  api_deleteApi: '/AM-040',
  api_bindMFA: '/AM-041',
  api_getApiGroups: '/AM-042',
  api_addApiGroup: '/AM-043',
  api_delApiGroup: '/AM-044',
};
const sec = {
  api_getCityByPage: '/City/getCityByPage',                                             //分页查询已配置的城市
  api_getAllCity: '/City/getAllCity',                                                   // 获取开通城市列表
  api_getCityBuzzConfigList: '/City/cityBuzzConfigList',                                // 查询城市关联业务
  api_getCityBuzz: '/City/getCityBuzz',                                                 // 查询城市关联业务配置项
  api_saveCityBuzzConfig: '/City/saveCityBuzzConfig',                                   // 保存城市关联业务
  api_deletecityBuzzConfigByCode: '/City/deletecityBuzzConfigByCode',                   // 删除城市关联业务
  api_getCityOfficialConfigList: '/City/getCityOfficialConfigList',                        //查询城市官网信息配置列表
  api_saveCityOfficialConfigInfo: '/City/saveCityOfficialConfigInfo',                 // 保存城市官网信息
  api_deleOfficialConfig: '/City/deleOfficialConfig',                                   // 删除城市官网信息
  api_getAvgWage: '/City/getAvgWage',                                                   // 查询城市平均工资
  api_saveHistoricalAvgWage: '/City/saveHistoricalAvgWage',                            // 批量保存城市平均工资
  api_getSecurityIaByCityCode: '/City/getSecurityIaByCityCode',                        // 查询城市社保用途配置列表
  api_addOrUpdateSecurityIa: '/City/addOrUpdateSecurityIa',                           // 添加或更新城市社保用途配置列表
  api_deleteSecurityIa: '/City/deleteSecurityIa',                                     // 删除城市社保用途
  api_getCityConfigByCityCode: '/City/getCityConfigByCityCode',                                    // 根据城市编码查询城市配置
  api_updateCityLogConfig: '/City/updateCityLogConfig',                                      // 保存城市日志配置
  api_updateCityCustomerServiceConfig: '/City/updateCityCustomerServiceConfig',        // 更新城市客服配置
  api_queryOfficialNameByCityCode: '/City/queryOfficialNameByCityCode',                //获取城市社保公积金官网配置
  api_queryCityOfficialParam: '/City/queryCityOfficialParam',                          // 获取城市业务表单信息  
  api_selectCitySpiderConfig: '/City/selectCitySpiderConfig',                          // 获取城市爬虫抓取服务配置信息
  api_saveCitySpiderConfig: '/City/saveCitySpiderConfig',                              // 保存城市爬虫抓取服务配置
  api_getCityThirdPartyByPage: '/City/getCityThirdPartyByPage',                        // 获取城市爬虫抓取服务配置信息
  api_addCityThirdParty: '/City/addCityThirdParty',                                    // 更新城市第三方配置信息
  api_updateCityThirdParty: '/City/updateCityThirdParty',                              // 更新城市第三方配置信息
  api_saveTieCardInformation: '/City/saveTieCardInformation',                          // 保存官网表单参数信息 
  api_deleteTieCardInformation: '/City/deleteTieCardInformation',                       // 删除官网表单参数信息 
  api_getCityPromptMsg: '/City/getCityPromptMsg',                                      // 查询城市业务提示信息
  api_saveCityPromptMsg: '/City/saveCityPromptMsg',                                   // 保存城市业务提示信息
  api_getCityInfoAccPass: '/City/getCityInfoAccPass',                                 // 查询城市注册或者修改密码配置列表信息
  api_pushedNoticeSingle: '/City/pushedNoticeSingle',                                 // 推送单条信息
  api_pushedNoticeList: '/City/pushedNoticeList',                                     // 推送多条信息
  api_pushedNoticeNumber: '/City/pushedNoticeNumber',                                 // 查看在线人数
  api_getConfigAppId: '/City/getAppId',                                               // 获取appId配置 
  api_getCityMaintenaceTip: '/City/getCityMaintenanceTip',                            //查询城市维护信息列表
  api_saveMaintenanceInfor: '/City/saveOrUpdateCityMaintenance',                        //保存城市维护信息
  api_getCityPaymentList: '/City/getCityPaymentList',                                 //查询城市最新缴费管理列表
  api_saveCityPayment: '/City/saveOrUpdateCityPayment',                               //添加or修改城市最新缴费管理列表
  api_getBindFailList: '/card/getTieCardFail',                                        //绑卡失败记录查询
  api_getTieCardFailLog: '/card/getTieCardFailLog',                                   //卡操作日志列表
  api_decryptCard: '/card/decryptCardMsg',                                            //解密社保、公积金
  api_getSecurityCardList: '/card/getSecurityCardList',                                 // 社保卡绑卡信息
  api_getSecurityCardDetail: '/card/getSecurityCardDetail',                           // 社保卡绑卡信息详情
  api_getSecurityCardPayMentList: '/card/getSecurityCardPayMentList',                 // 社保卡缴费缴费详情
  api_getFundCardList: '/card/getFundCardList',                                       // 公积金绑卡信息

  api_getFundCardDetail: '/card/getFundCardDetail',                                   // 公积金绑卡信息详情
  api_getFundCardPayMentList: '/card/getFundCardPayMentList',                         // 公积金缴费信息详情


  api_censusBugMsg: '/bug/censusBugMsg',             // bug统计
  api_getDayBugByPage: '/bug/getDayBugByPage',       // 每日bug
  api_decryptBugById: '/bug/decryptBugById',         // bug解密
  api_updateBugState: '/bug/updateBugState',         // 修改bug信息      
  api_updateBugRemark: '/bug/updateBugRemark',       // 修改备注信息


  api_getCityBusiness: '/City/getCityBusiness',             // 城市社保、公积金业务管理列表
  api_getCityBusinessReport: '/City/getCityBusinessReport', // 获取城市业务报表
  api_updateCityBusiness: '/City/updateCityBusiness',       // 更新城市业务信息
  api_saveCityBusiness: '/City/saveCityBusiness',           // 保存城市社保、公积金业务信息
  api_deleteCityBusiness: '/City/deleteCityBusiness',       // 删除城市社保、公积金业务信息
  api_report: '/cityBusiness/report'                        // 获取城市报表
};

const pss = {
  api_byParentIdAndName: '/personas/userTags/byParentIdAndName', //子标签列表
  api_getUserCount: '/personas/relation/userCount',
};
const apiMap = apiMapFunc('/api/admin/api', api);
const secMap = apiMapFunc('/api/pool', sec);
const pssMap = apiMapFunc('/api/personas', pss);

export default apiMap;
export { secMap };
export { pssMap };
